import type * as Tables from "./type.ts"
import { request } from "@/http/axios.ts"

/** 增 */
export function createCardDataApi(data: Tables.AddForm) {
  return request({
    url: "/parking/card",
    method: "post",
    data
  })
}

/** 删 */
export function deleteCardDataApi(ids: string) {
  return request({
    url: `/parking/card/${ids}`,
    method: "delete"
  })
}

/** 改 */
export function updateCardDataApi(data: Tables.AddForm) {
  return request({
    url: "/parking/card/edit",
    method: "put",
    data
  })
}
export function getMonthCardDetailDataApi(id: number) {
  return request ({
    url: `/parking/card/${id}`
  })
}
/** 查 */
export function getEnterpriseListAPI(params: any) {
  return request({
    url: "/park/enterprise",
    params
  })
}
export function getEnterpriseDetailAPI(id: number) {
  return request({
    url: `/park/enterprise/${id}`,
    method: "GET"
  })
}
// 上传营业执照
export function uploadAPI(data: any) {
  return request({
    url: "/upload",
    method: "POST",
    data
  })
}
// 新建公司
export function createEnterpriseAPI(data: Tables.AddForm) {
  return request({
    url: "/park/enterprise",
    method: "POST",
    data
  })
}
// 行业
export function getIndustryListAPI() {
  return request({
    url: "/park/industry"
  })
}
